<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>石猴红木_产品列表</title>
    <link rel="stylesheet" href="${base}/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${base}/css/admin.css">
    <style>
    	.layui-bg-black{width: 200px;height: 136px;margin-right: 30px;float: left;text-align: center;font-size: 33px;color: #000000!important;padding-top: 30px;}
    	.hide {display: none;}
    	.checkbox{display: inline-block;}
    	.layui-form-item{font-size: 18px;}
    	.width100 {width: 100px; margin-right: 30px;float: left;}
    	.width180 {width: 180px; margin-right: 20px;float: left;}
    	.layui-input { display: inline-block; }
    	
    </style>
</head>
<body  class="layui-layout-body" style="overflow:scroll;">	
<div class="layui-main" style="position: absolute;left: 4px;top: 4px; width: calc(100% - 10px);" >
<blockquote class="layui-elem-quote layui-quote-nm">
	<div class="layui-input-inline">
 		<a target="target" href="${base}/shihou/one"><button class="layui-btn" id="add" ><img alt="" src="${base}/images/addto.png" width="16px" height="16px" /> 新加</button></a>
 	</div>
 	<form action="${base}/shihou/list" method="post" id="dataForm" >
        <input type="hidden" id="page" name="page" value="1"/>
 		<div class="layui-input-inline" >
 			<div class="layui-form" style="display: inline-block;">
		 		<div class="layui-input-inline layui-form-item" >
		 			<label class="layui-form-label"></label>
				    <div class="layui-input-block" style="display: none;">
				      <button class="layui-btn" lay-submit=""> <span class="fa fa-search"></span> 查询</button>
				    </div>
		 		</div>
	 		</div>
 		</div>
 		
    </form>
 	
</blockquote> 

<table class="layui-table" >
	<thead>
       <tr>
           <th>id</th>
           <th>类型</th>
           <th>图片</th>
           <th>名称</th>
           <th>录入时间</th>
        </tr>
     </thead>
     <tbody>
     <#list page.list as one>
     <tr>
     	<td > <a href="${base}/shihou/one?id=${one.id}" target="_blank">${one.id}</a></td>
     	<td>${one.type?replace("\"","")}</td>
     	<td><a href="${one.pic_url}"><img src="${one.pic_url}?imageView2/1/w/100/h/100" /></a></td>
     	<td>${one.name?default('')}</td>
     	<td>${one.create_time_string} </td>
     </tr>
     </#list>
     </tbody>
</table>
<div id="pageDiv"></div>
</div>
</body>
<script src="${base}/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="${base}/layui/layui.all.js"></script>
<script type="text/javascript">
layui.use('laypage',function () {
    var laypage = layui.laypage ;
    laypage.render({
        elem:"pageDiv",
        count:${page.totalPage*20},
        limit:20,
        curr:${page.pageNumber},
        layout:['count','prev','page','next','skip'],
        jump:function (obj,first) {
            var page = obj.curr;
            console.log("page:" + page)
            if(!first){
                $("#page").val(page);
                $("#dataForm").submit();
            }
        }
    });
});
</script>
</html>